<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-08-17
    	描述：信息技术库
    -->
	<div class="PressRelease">
		<div class="search-box">
			<div class="fl">
				<input @click="manually()" class="btn-boxs" type="button" value="人工录入" />
        <input ref="inputFile" type="file" @change="inputData($event)" accept=".xls,.xlsx" style="display: none"/>
        <input class="btn-boxs" type="button" value="数据导入" @click="$refs.inputFile.click()"/>
				<input class="btn-boxs" type="button" value="数据导出" @click="exportData"/>
			</div>
			<div class="fr">
				<select class="search" v-model="searchType">
          <option value="name">成果名</option>
          <option value="applicant">申请人</option>
          <option value="overtNum">公开号</option>
				</select>
        <input name="search" class="search" type="text" autocomplete="off" v-model="search"/>
        <input class="btn" type="button" value="搜索" @click="searchTodo"/>
			</div>
		</div>
		<div class="PressRelease-list">
			<table>
				<thead>
					<tr>
						<th class="table-text-th2">成果名称</th>
						<th class="table-text-th1">申请人</th>
						<th class="table-text-th1">公开号</th>
						<th class="table-text-th1">联系电话</th>
						<th class="table-text-th3">操作</th>
					</tr>
				</thead>
				<tbody>
          <tr v-if="technologicalInformationList.length == 0">
            <td colspan="5" class="center">暂无数据！</td>
          </tr>
          <tr v-for="technologicalInformation in technologicalInformationList">
						<td :title="technologicalInformation.name"><span class="show-oneline-table">{{technologicalInformation.name}}</span></td>
						<td :title="technologicalInformation.applicant"><span class="show-oneline-table">{{technologicalInformation.applicant}}</span></td>
						<td :title="technologicalInformation.overtNum"><span class="show-oneline-table">{{technologicalInformation.overtNum}}</span></td>
						<td :title="technologicalInformation.phone"><span class="show-oneline-table">{{technologicalInformation.phone}}</span></td>
						<td>
              <input @click="manually(technologicalInformation.id)" type="button" value="修改" class="delete write" />
							<input @click="toView(technologicalInformation.id)" type="button" value="查看" class="delete write" /></td>
					</tr>
				</tbody>
			</table>
			<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
			<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
		</div>

		<!-- 人工录入-模态框-->
		<div v-show="ApplicationStatus" class="tenant-model">
			<div class="tenant-model-content Application">
				<header class="tenant-model-header">
					<h3 v-if="!isModify">人工录入</h3>
					<h3 v-if="isModify">修改</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--模态框内容板块-->
						<form id="technologicalInformationForm" class="form-box">
              <input type="hidden" name="id" :value="technologicalInformation.id"/>
              <div class="form-line input-required">
								<label>成果名称：</label>
								<div class="input-box">
									<input name="name" type="text" :value="technologicalInformation.name">
								</div>
							</div>
							<div class="form-line input-required">
								<label>申请人：</label>
								<div class="input-box">
									<input name="applicant" type="text" :value="technologicalInformation.applicant">
								</div>
							</div>
							<div class="form-line input-required">
								<label>公开号：</label>
								<div class="input-box">
									<input name="overtNum" type="text" :value="technologicalInformation.overtNum">
								</div>
							</div>
							<div class="form-line input-required">
								<label>联系方式：</label>
								<div class="input-box">
									<input name="phone" type="text" :value="technologicalInformation.phone">
								</div>
							</div>
							<br/>
							<div class="search-boxs ">
								<label class="textarea-label">成果简介：</label>
								<textarea name="introduction" class="textarea" value="成果简介" >{{technologicalInformation.introduction}}</textarea>
							</div>
              <input type="reset" style="display: none"/>
						</form>
						<div class="tab-tit">
							<a href="javascript:;" @click="curId=0" :class="{'cur':curId===0}">文本</a>
							<a href="javascript:;" @click="curId=1" :class="{'cur':curId===1}">图像</a>
							<a href="javascript:;" @click="curId=2" :class="{'cur':curId===2}">音视频</a>
						</div>
						<div class="tab-con">
							<div v-show="curId===0">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="上传" class="delete write" />
										</td>
										<td>
											<input type="button" value="查看" class="delete write" />
										</td>
									</tr>
								</table>
							</div>
							<div v-show="curId===1">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="上传" class="delete" />
										</td>
										<td>
											<input type="button" value="查看" class="delete" />
										</td>
									</tr>
								</table>
							</div>
							<div v-show="curId===2">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="上传" class="delete" />
										</td>
										<td>
											<input type="button" value="查看" class="delete" />
										</td>
									</tr>
								</table>
							</div>
						</div>

					</div>
				</div>
				<footer class="tenant-model-footer">
					<button class="determine" @click="saveData" v-if="technologicalInformation.id == null || technologicalInformation.id == ''">确认</button>
          <button class="determine" @click="updateData" v-else>确认</button>
				</footer>
			</div>
		</div>
		<!--查看-模态框-->
		<div v-if="Application" class="tenant-model">
			<div class="tenant-model-content ApplicationStatus">
				<header class="tenant-model-header">
					<h3>查看</h3>
					<span @click="closeModel" class="closeModel">×</span>
				</header>
				<div class="tenant-model-body">
					<div class="search-contain">
						<!--模态框内容板块-->
						<form class="form-box">
							<div class="form-line">
								<label>成果名称：</label>
								<div class="input-box">
									{{technologicalInformation.name}}
								</div>
							</div>
							<div class="form-line ">
								<label>申请人：</label>
								<div class="input-box">
                  {{technologicalInformation.applicant}}
								</div>
							</div>
							<div class="form-line ">
								<label>公开号：</label>
								<div class="input-box">
                  {{technologicalInformation.overtNum}}
								</div>
							</div>
							<div class="form-line ">
								<label>联系方式：</label>
								<div class="input-box">
                  {{technologicalInformation.phone}}
								</div>
							</div>
								<div>
								<label class="textareas-label">成果简介：</label>
								<div class="textareas">
                  {{technologicalInformation.introduction}}
								</div>
							</div>
						</form>
						<div class="tab-tit">
							<a href="javascript:;" @click="curId=0" :class="{'cur':curId===0}">文本</a>
							<a href="javascript:;" @click="curId=1" :class="{'cur':curId===1}">图像</a>
							<a href="javascript:;" @click="curId=2" :class="{'cur':curId===2}">音视频</a>
						</div>
						<div class="tab-con">
							<div v-show="curId===0">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="下载" class="delete" />
										</td>
										<td>
											<input type="button" value="查看" class="delete" />
										</td>
									</tr>
								</table>
							</div>
							<div v-show="curId===1">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="下载" class="delete" />
										</td>
										<td>
											<input type="button" value="查看" class="delete" />
										</td>
									</tr>
								</table>
							</div>
							<div v-show="curId===2">
								<table>
									<tr>
										<th>文本名称</th>
										<th>文本格式</th>
										<th>文本大小</th>
										<th>附件</th>
										<th>在线预览</th>
									</tr>
									<tr>
										<td>个人简历</td>
										<td>.doc</td>
										<td>2MB</td>
										<td>
											<input type="button" value="下载" class="delete" />
										</td>
										<td>
											<input type="button" value="查看" class="delete" />
										</td>
									</tr>
								</table>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</div>

</template>
<script src="./InformationTechnologyLibrary.js"></script>

<style scoped>
	@import "InformationTechnologyLibrary.css"
</style>
